package com.choudou5.solr.util.bean;

import java.io.Serializable;

/**
 * @name 词
 * @author choudou5
 * @date 2018-08-14
 */
public class WordBean implements Serializable {

    private String word;
    private String type;

    public WordBean() {
    }

    public WordBean(String word, String type) {
        this.word = word;
        this.type = type;
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public int hashCode() {
        return this.getWord().hashCode()+this.getWord().hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if(this==obj)
            return true;
        if(obj instanceof WordBean){
            WordBean i = (WordBean)obj;
            return (this.getWord().equals(i.getWord()) && this.getType().equals(i.getType()));
        }else {
            return false;
        }
    }
}
